package base.world;

import base.Start;

public class WorldUtil
{
	/**Transfers current world living list to next world, and changes worlds*/
	public static void transferWorld(World par1World, World par2World)
	{
		par2World.livingList = par1World.livingList;
		moveToWorld(par1World, par2World);
	}
	
	/**Initiates the next world, then destroys the old world*/
	public static void moveToWorld(World par1World, World par2World)
	{
		if (par2World != null)
		{
			par2World.initWorld();
		}
		
		Start.theNextWorld = par2World;
		par1World.destroyWorld();
	}
}
